import { DELETE, GET, POST } from '../axios.config.js'

const base = window.config.ip
const projectName = '/business'

// 新增帮扶政策
export const saveHelpPolicyApi = p => POST(`${base}${projectName}/ZcHelpPolicy/saveHelpPolicy`, p)

// 编辑帮扶政策
export const editHelpPolicyApi = p => POST(`${base}${projectName}/ZcHelpPolicy/editHelpPolicy`, p)

// 获取帮扶政策列表
export const listHelpPolicyPagesApi = p => GET(`${base}${projectName}/ZcHelpPolicy/listHelpPolicyPages`, p)

// 获取帮扶政策详情
export const getHelpPolicyDetailApi = p => GET(`${base}${projectName}/ZcHelpPolicy/getHelpPolicyDetail`, p)

// 删除帮扶政策
export const deleteHelpPolicyApi = id => DELETE(`${base}${projectName}/ZcHelpPolicy/deleteHelpPolicy?id=${id}`)

// 新增政策优化方案
export const savePolicyPlanApi = p => POST(`${base}${projectName}/ZcPolicyPlan/savePolicyPlan`, p)

// 新增政策优化方案
export const editPolicyPlanApi = p => POST(`${base}${projectName}/ZcPolicyPlan/editPolicyPlan`, p)

// 编辑政策优化方案
export const listPolicyPlanPagesApi = p => GET(`${base}${projectName}/ZcPolicyPlan/listPolicyPlanPages`, p)

// 获取政策优化方案详情
export const getPolicyPlanDetailApi = p => GET(`${base}${projectName}/ZcPolicyPlan/getPolicyPlanDetail`, p)

// 获取全部帮扶政策
export const listAllRulesApi = p => GET(`${base}${projectName}/ZcHelpPolicy/listAllRules`, p)

// 删除政策优化方案
export const deletePolicyPlanApi = id => DELETE(`${base}${projectName}/ZcPolicyPlan/deletePolicyPlan?id=${id}`)

// 获取帮扶政策统计
export const getHelpPolicyStatistics = p => GET(`${base}${projectName}/ZcHelpPolicy/getHelpPolicyStatistics`, p)
